<script type="text/javascript">
      function request() {
        <?php echo oSCreateDataRequest() ?>
        opt_params[opensocial.DataRequest.PeopleRequestFields.PROFILE_DETAILS] = [
          opensocial.Person.Field.PROFILE_URL
        ];
        <?php echo oSAddGetOwnerRequest() ?>
        <?php //echo oSAddGetViewerFriendsRequest() ?>
        <?php echo oSSendDataRequest(response) ?>
      }

      function response(data) {
        var viewer =  <?php echo oSGetData(data,getVaraibleOwnerName()) ?>
        var name = <?php echo oSGetPersonName(viewer) ?>
        var thumb = <?php echo oSGetPersonThumbnailURL(viewer) ?>
        var profile = <?php echo oSGetPersonProfileURL(viewer) ?>
        var id = <?php echo oSGetPersonId(viewer) ?>
        var isOwner = <?php echo oSGetPersonIsOwner(viewer) ?>
        var isViewer = <?php echo oSGetPersonIsViewer(viewer) ?>
        
        var html = '<img src="' + thumb + '"/>' + 
                   '<a href="' + profile + '" target="_top">' + name + ' id:' + id +' isOwner:' + isOwner +' isViewer:' + isViewer + ' </a>';

        html += '<hr>'; 
        

        document.getElementById('main').innerHTML = html;
      } 
</script>
